package kg.aibek.preuler1;

public class Problem2 {
	public static void main(String[] args) {
		int p1 = 1;
		int p2 = 2;
		int sum = 0;

		while (p2 <= 4000000) {
			if (p2 % 2 == 0)
				sum += p2;

			int temp = p2;
			p2 = p1 + p2;
			p1 = temp;
		}

		System.out.println(sum);
	}
}
